import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";

Vue.use(VueRouter);

/** @type {import('vue-router').RouteConfig[]} */
const routes = [
  {
    path: "/",
    name: "home",
    component: HomeView,
  },
  {
    path: "/about",
    component: () =>
      import(/* webpackChunkName: "about" */ "../views/AboutView.vue"),
  },
  {
    path: "/editor/json",
    component: () => import(/* webpackChunkName: "editor-json" */ "../views/JsonEditor.vue"),
  },
  {
    path: "/editor/sql",
    component: () => import(/* webpackChunkName: "editor-sql" */ "../views/SqlEditor.vue"),
  },
  {
    path: "/editor/yaml",
    component: () => import(/* webpackChunkName: "editor-yaml" */ "../views/YamlEditor.vue"),
  },
];

const router = new VueRouter({
  routes,
});

export default router;
